Using iconFormat property to setting and format node icon path
View code
new fly.mini.Tree({
//节点icon属性将用该格式进行格式化(其中{0}代表节点实例化时指定的 icon 属性)
// Icon attribute node with the format for
formatting (thereinto {0} representative node instantiated attribute specified
icon)
iconFormat:"imgs/{0}.gif",
items:[{
icon: "a"
},{
icon: "b"
}]
})
The above code is equivalent to:
new fly.mini.Tree({
items:[{
icon: "imgs/a.gif"
},{
icon: "imgs/b.gif"
}]
})
You can also format icon path like this:
new fly.mini.Tree({
//节点icon属性将用该格式进行格式化(其中{tag}代表节点的 tag 属性)
// Icon attribute node with the format for
formatting (thereinto {tag} representative node instantiated attribute specified
icon)
iconFormat:"imgs/{tag}.gif",
items:[{
tag: "a"
},{
tat: "b"
}]
})